<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>留言管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <!--菜单回显-->
    <#assign currentMenu="messageBoard"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>查看留言</h1>
        </section>
        <section class="content">
            <div class="box">
                <form class="form-horizontal" action="" method="post" id="editForm">
                    <input type="hidden" name="id" value="${role.id}">
                    <div class="form-group"  style="margin-top: 10px;">
                        <label  class="col-sm-2 control-label">角色名称：</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" name="name" value="${role.name}" placeholder="请输入角色名称">
                        </div>
                    </div>






                    <div class="form-group">
                        <div class="col-sm-offset-1 col-sm-6">
                            <button type="button" class="btn btn-primary btn-submit">保存</button>
                            <a href="javascript:window.history.back()" class="btn btn-danger">取消</a>
                        </div>
                    </div>
                </form>
            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
<script>
    $(function () {
        $("#saveReply").click(function () {
            var id = $(this).data("id");
            Swal.fire({
                title: '确定发布回复吗?',
                text: "回复后数据无法修改!",
                icon: 'warning',
                showCancelButton: true,
                confirmButtonText: '确定',
                cancelButtonText: '取消'
            }).then((result) => {
                if (result.value) {
                    var content = $("#content").val();
                    var param = {"id":id, "content":content};
                    $.post("", param, function (data) {
                        console.log(data);
                        if(data.success){
                            Swal.fire({
                                title: '回复成功',
                                icon: 'success'
                            });
                            window.location.reload();
                        }
                    });
                }
            });
        });
    });
</script>
</body>
</html>
